//
//  AboutUsViewController.m
//  Lovetome
//
//  Created by Xiemaoxiong on 16/7/8.
//  Copyright © 2016年 上海爱途蜜网络科技有限公司. All rights reserved.
//

#import "AboutUsViewController.h"

@interface AboutUsViewController()
@property (nonatomic,strong) UIImageView *logoImageView;
@property (nonatomic,strong) UILabel *versionLabel;
@property (nonatomic,strong) UILabel *companyLabel;
@end

@implementation AboutUsViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = Color_BackGroundColor;
    self.title = @"关于我们";
    [self.view addSubview:self.logoImageView];
    [self.view addSubview:self.versionLabel];
    [self.view addSubview:self.companyLabel];
    [self layoutSubviews];
}


#pragma mark - masonry
- (void)layoutSubviews {
    [self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(Size(200), Size(200)));
        make.centerX.mas_equalTo(self.view.mas_centerX);
        make.top.mas_equalTo(self.mas_topLayoutGuideBottom).offset(Padding(100));
    }];
    
    [self.versionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.view.mas_centerX);
        make.top.mas_equalTo(self.logoImageView.mas_bottom).offset(Padding(100));
    }];
    
    [self.companyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.view.mas_centerX);
        make.bottom.mas_equalTo(self.view.mas_bottom).with.offset(-Padding(100));
    }];
}



#pragma mark - get&set

- (UIImageView *)logoImageView {
    if (!_logoImageView) {
        _logoImageView = [[UIImageView alloc] init];
        _logoImageView.backgroundColor = Color_MainColor_Red;
    }
    return _logoImageView;
}

- (UILabel *)versionLabel {
    if (!_versionLabel) {
        _versionLabel = [[UILabel alloc] init];
        _versionLabel.textColor = color_text_threelevel;
        _versionLabel.font = FontSize(24);
        _versionLabel .textAlignment = NSTextAlignmentCenter;
        _versionLabel.text = [NSString stringWithFormat:@"版本号 :%@",[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]];
    }
    return _versionLabel;
}

- (UILabel *)companyLabel {
    if (!_companyLabel) {
        _companyLabel = [[UILabel alloc] init];
        _companyLabel.textColor = color_text_threelevel;
        _companyLabel.font = FontSize(24);
        _companyLabel.textAlignment = NSTextAlignmentCenter;
        _companyLabel.numberOfLines = 0;
        _companyLabel.text = @"杭州犇富互联网金融服务有限公司\n Copyright @2016 All right reserved";
    }
    return _companyLabel;
}
@end
